import request from '@/utils/request'

// 查询优惠券类型管理列表
export function listCouponType(query) {
  return request({
    url: '/marketing/couponType/list',
    method: 'get',
    params: query
  })
}

// 查询优惠券类型管理详细
export function getCouponType(couponTypeId) {
  return request({
    url: '/marketing/couponType/' + couponTypeId,
    method: 'get'
  })
}

// 新增优惠券类型管理
export function addCouponType(data) {
  return request({
    url: '/marketing/couponType',
    method: 'post',
    data: data
  })
}

// 修改优惠券类型管理
export function updateCouponType(data) {
  return request({
    url: '/marketing/couponType',
    method: 'put',
    data: data
  })
}

// 删除优惠券类型管理
export function delCouponType(couponTypeId) {
  return request({
    url: '/marketing/couponType/' + couponTypeId,
    method: 'delete'
  })
}
